import React from 'react'
import { createForm, FormPath } from '@formily/core'
import { attach } from '@formily/core/src/__tests__/shared'

const form = attach(createForm())

attach(
  form.createObjectField({
    name: 'object',
  })
)
attach(
  form.createVoidField({
    name: 'void',
    basePath: 'object',
  })
)
attach(
  form.createField({
    name: 'normal',
    basePath: 'object.void',
  })
)
attach(
  form.createArrayField({
    name: 'array',
  })
)

// object
// object.void
// object.void.normal
// object.array

// console.log('fields: ', form.fields)

// @ts-ignore
window._parse = FormPath.parse

export default () => {
  return <div>path Test</div>
}
